package java10;
import com.mchange.v2.c3p0.ComboPooledDataSource;
import javax.sql.DataSource;
import java.sql.Connection;
import java.sql.SQLException;

public class C3P0Test01 {
    public static void main(String[] args){
        //创建数据库连接池对象
        DataSource ds = new ComboPooledDataSource();
        //获取连接对象
        try {
            Connection conn = ds.getConnection();
        } catch (SQLException throwables) {
            throwables.printStackTrace();
        }
        //打印
        System.out.println(ds);
    }
}
